package restlet;

import org.restlet.Client;
import org.restlet.data.Form;
import org.restlet.data.Method;
import org.restlet.data.Protocol;
import org.restlet.Request;
import org.restlet.Response;

public class ApplicationTest {
	public static void main(String[] args) throws Exception {
		Request request = new Request(Method.PUT, "http://localhost:8182");
		Form form = new Form();
//		form.add("name", args[0]);
//		form.add("number", args[1]);
		form.add("name", "kimhakyong");
		form.add("number", "1234");
		request.setEntity(form.getWebRepresentation());
		Client client = new Client(Protocol.HTTP);
		Response response = client.handle(request);

		System.out.println(response.getEntity().getText());
	}
}
